
using Newtonsoft.Json;
using SqlSugar;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace CoreCms.Net.Model.Entities
{
    /// <summary>
    /// 订货会产品关联表
    /// </summary>
    [SugarTable("CoreShopOrderMeetingGoods", TableDescription = "订货会表")]
    public partial class CoreShopOrderMeetingGoods
    {
        /// <summary>
        /// 订货会表
        /// </summary>
        public CoreShopOrderMeetingGoods()
        {
        }

        /// <summary>
        ///    自增序号
        /// </summary>
        [Display(Name = "商品ID")]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [Required(ErrorMessage = "请输入{0}")]
        public int id { get; set; }
        /// <summary>
        ///     订货会ID
        /// </summary>
        [Display(Name = "订货会ID")]
        [Required(ErrorMessage = "请输入{0}")]
        public int meetingid { get; set; }

        /// <summary>
        ///     产品id
        /// </summary>
        [Display(Name = "产品id")]
        [Required(ErrorMessage = "请输入{0}")]
        public int goodid { get; set; }


        [Display(Name = "订货会价格")]
        [Required(ErrorMessage = "请输入{0}")]
        public decimal meetingprice { get; set; } = 0;

        [Display(Name = "订货会起订量")]
        [Required(ErrorMessage = "请输入{0}")]
        public int meetingminimum { get; set; }


        [Navigate(NavigateType.OneToOne, nameof(goodid))]//一对一 导航属性
        [SugarColumn(IsIgnore = true)]
        [AllowNull]
        public CoreCmsGoods goods { get; set; }

      

    }
}